import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    username: "用户名",
    Picture: false,
    videoEnd: false,
    treeData:[],
    nvrData:[], // 设备列表
  },
  mutations: {
    setUserName(state, data) {
      state.username = data;
    },
  
    setTreeData(state,data){
      state.treeData = data;
    },
    setPicture(state, data) {
      state.Picture = data;
    },
    setNvrData(state,data){
      state.nvrData = data
    },
    setVideoEnd(state, val) {
      state.videoEnd = val;
    },
  },
  actions: {},
  modules: {},
  getters: {},
});
